<template>
    <el-radio-group v-model="rawData[feild]" @change="change">
        <el-radio v-for="item in options" :key="item.id" :label="item.val">{{item.label}}</el-radio>
    </el-radio-group>
</template>
<script>
export default {
  props: {
    rawData: {
      type: Object
    },
    type: String,
    code: String,
    feild: String
  },

  data() {
    return {
      val: ""
    };
  },
  mounted() {
  },

  methods: {
    change() {
      this.$emit("radioChange", this.val);
    }
  },

  created() {

  },

  computed: {
    options() {
      //todo

      var arr = [];
      var obj = {};
      obj.val = "man";
      obj.label = "男";
      arr.push(obj);
      obj = {};
      obj.val = "woman";
      obj.label = "女";
      arr.push(obj);
      return arr;
    }
  }
};
</script>